(function () {

    "use strict";

    var api = {
        fansCountUrl: '/api/user/fansCount'
    };
    sm.controller('wx-center-fans-controller', ['$scope', '$http', function ($scope, $http){


        $scope.fansInfo = {};
        $http.get(api.fansCountUrl).success(function (res) {
            if (res.state) {
                $scope.fansInfo = res.data;
            }
        });

        $scope.showFansLists = function (level) {
            if (level == 1 && $scope.fansInfo.level1 == 0) {
                return false;
            } else if (level == 2 && $scope.fansInfo.level2 == 0) {
                return false;
            }

            location.href="/center/fansLists?level=" + level;
        };


    }]);
})();

